package com.ideaaedi.extspringcache.custom;


import com.ideaaedi.extspringcache.redis.ExtRedisCacheManager;
import org.springframework.boot.autoconfigure.cache.CacheProperties;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;

/**
 * {@link ExtRedisCacheManager}定制器
 *
 * @author <font size = "20" color = "#3CAA3C"><a href="https://gitee.com/JustryDeng">JustryDeng</a></font> <img
 * src="https://gitee.com/JustryDeng/shared-files/raw/master/JustryDeng/avatar.jpg" />
 * @since 2023-05-31 11:58:33
 */
public interface ExtRedisCacheManagerCustomizer {
    
    /**
     * 定制返回ExtRedisCacheManager
     *
     * @param redisTemplate 容器中的RedisTemplate实例
     * @param cacheProperties spring中对cache的配置
     * @param classLoader 类加载器
     *
     * @return ExtRedisCacheManager实例
     */
    @NonNull
    ExtRedisCacheManager customBuild(@SuppressWarnings("rawtypes") @NonNull RedisTemplate redisTemplate,
                                     @Nullable CacheProperties cacheProperties, @Nullable ClassLoader classLoader);
}